<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>详情</title>
		<meta name="Description" content="" />
		<meta name="Keywords" content="" />
		<meta name="format-detection" content="telephone=no, email=no" />
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<!-- 忽略页面中的数字识别为电话，忽略email识别 -->
		<meta name="applicable-device" content="mobile" />
		<meta name="apple-mobile-web-app-title" content="" />
		<!-- 添加到主屏后的标题（iOS 6 新增） -->
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<!-- 是否启用 WebApp 全屏模式 -->
		<meta name="HandheldFriendly" content="true" />
		<!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
		<meta name="author" content="Jack" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script src="../../js/flexible.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="../../style/jquery_css/weui.css" />
		<link rel="stylesheet" type="text/css" href="../../style/jquery_css/jquery-weui.css" />
		<link rel="stylesheet" type="text/css" href="../../style/car.css" />
		<link rel="stylesheet" type="text/css" href="../../style/icon_font/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="../../swiper/css/swiper.min.css" />
		<link rel="stylesheet" type="text/css" href="../../style/main.css"/>
		<link rel="stylesheet" type="text/css" href="../../style/icon.css"/>
	</head>
	<body>
		<div class="header-nav is-postion">
			<div class="cen-mony">
				<div class="header-flex">
					<i class="return-2" onclick="window.history.go(-1)"></i>
				</div>
				<div class="header-flex">详情</div>
				<div class="header-flex"></div>
			</div>
		</div>
		<div style="margin-top: 1.8rem;margin-bottom: 2rem;">
			<div class="swiper-box">
					<div class="swiper-container">
						<div class="swiper-wrapper" id="banner-details">
							<!--<div class="swiper-slide"><img src="../../images/index-img.png" /></div>
							<div class="swiper-slide"><img src="../../images/index-img.png" /></div>
							<div class="swiper-slide"><img src="../../images/index-img.png" /></div>-->
						</div>
						<!-- 如果需要分页器 -->
						<div class="swiper-pagination"></div>

						<!-- 如果需要导航按钮 -->
						<!--<div class="swiper-button-prev"></div>
						    <div class="swiper-button-next"></div>-->
					</div>
				</div>
			
			<div class="car-details-box">
				<div class="car-details">
					<div class="details-title"></div>
					<div class="details-brief"></div>
					<div>价格：<span class="details-pic"></span></div>
				</div>
			</div>
			
			<div class="detail-img">
				<div class="detail-img-list"></div>
				
			</div>
			
				
		</div>
		<div class="detail-bottom-postion">
			<div class="detail-bottom">
				<a href="javascript:;" class="details-btn detail-bg1" onclick="obj_data.servicePhone()">联系客服</a>
				<a href="javascript:;" class="details-btn  detail-bg2" onclick="obj_data.payment()">在线付款</a>
				<a href="javascript:;" class="details-btn  detail-bg3" onclick="obj_data.my_audit()">订单提交</a>
			</div>
		</div>
		
	</body>
	<script src="../../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/weiUI/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/api/api_url.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/api/port_url.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/md5/access.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/swiper/swiper.min.js" type="text/javascript" charset="utf-8"></script>
	
	<script type="text/javascript">
		$(function(){
			obj_data.goods_details();
		})
		var share =
			'<div class="share-pople"></div>';
		var obj_data = {
			goods_details:function(){
				$.ajax({
				url: config_URL.api+URL.goodsInfo, //请求的url地址
				dataType: "json", //返回格式为json
				data:{
					access_token:'6de687d898834bf3bf6c04ba278c1c07',
					gid:GetRequest().gid
				},
				type: "POST", //请求方式
				success: function(res) {
					console.log(res);
					var data = res.data;
					var banner_list = res.data.img_ids_array;
					var img_list = res.data.cont_ids_array;
					var banner_html = '';
					var cont_html = '';
					if(res.code==0){
          				for(var i in banner_list){
          					banner_html+='<div class="swiper-slide"><img src=" '+banner_list[i]+'" /></div>'
          				}
          				for(var j in img_list){
          					cont_html+='<img src=" '+img_list[j]+'"/>'
          				}
						$('#banner-details').html(banner_html);
						$('.detail-img-list').html(cont_html);
						var mySwiper = new Swiper('.swiper-container', {
							autoplay: true, //等同于以下设置
							loop: true, // 循环模式选项
				
							// 如果需要分页器
							pagination: {
								el: '.swiper-pagination',
							}	    
						});
						$('.details-title').html(data.title)
						$('.details-brief').html(data.ftitle)
						$('.details-pic').html(figureChange(data.money))
					}else{
						$.toast(res.msg, "text");
					}
					
					
				},
				error: function(rul) {
					console.log('网络出错')
				}
			});
			},
			my_audit: function() {
				if(sessionStorage.getItem("users_info") != null) {
					//location.href='material_submit.html'
					location.href='../index/order_submit.html'
				} else {
					location.href = '../login/login.html'
				}
			},
			payment:function(){
				$.alert(share, "暂未开通");
			},
			servicePhone:function(){
				$.ajax({
					url: config_URL.api+URL.servicePhone, //请求的url地址
					dataType: "json", //返回格式为json
					data:{
						access_token:'6de687d898834bf3bf6c04ba278c1c07',
					},
					type: "POST", //请求方式
					success: function(res) {
						var data = res.data;
						if(res.code==0){
							$.alert(share, data);
						}else{
							$.toast(res.msg, "text");
						}					
						
					},
					error: function(rul) {
						console.log('网络出错')
					}
				});
			}
		}
	</script>
	<script type="text/javascript">
		
	</script>
</html>
